#include <iostream>
#include <conio.h>
#include "Memory.h"

using namespace Course;
using namespace std;

int main()
{

	setlocale(LC_ALL, "swedish");
	Memory spel;
	Player spelande;
	spelande.Create_Players();
	spel.Choose_Difficulty();
	spel.FillWithEmptyCards();
	spel.AssignCards();
	
	while (1)
	{
		spel.PaintBoard(); 
		spelande.Paint_Player();
		if (spel.Move() == true)
		{
			spelande.Give_Player_Points(spelande.Get_Turn());
		}
		else
		{
			spelande.ChangeTurn();
		}

		if (spel.CheckWinner())
		{
			break;
		}

		else
		{
			continue;
		}
	}

	spelande.ShowPlayerWithHighestPoints();
	
	Console::gotoxy(25, 20);

	system("pause");
	return 0;
}